﻿// The Nova Project by Ken Beckett.
// Copyright (C) 2007-2012 Inevitable Software, all rights reserved.

using System.Collections.Generic;
using System.Windows.Media;

using Nova.CodeDOM;

namespace Nova.UI
{
    /// <summary>
    /// The view model for an <see cref="EmptyStatementVM"/>.
    /// </summary>
    public class EmptyStatementVM : StatementVM
    {
        #region /* STATICS */

        internal static void AddViewModelMapping()
        {
            CreateViewModel.Add(typeof(EmptyStatement), (codeObject, isDescription, dictionary) => new EmptyStatementVM((EmptyStatement)codeObject, dictionary));
        }

        #endregion

        #region /* CONSTRUCTORS */

        /// <summary>
        /// Create a view model instance for the specified <see cref="CodeDOM.EmptyStatement"/>.
        /// </summary>
        public EmptyStatementVM(EmptyStatement emptyStatement, Dictionary<CodeObject, CodeObjectVM> dictionary)
            : base(emptyStatement, dictionary)
        { }

        #endregion

        #region /* PROPERTIES */

        /// <summary>
        /// The underlying <see cref="CodeDOM.EmptyStatement"/> model.
        /// </summary>
        public EmptyStatement EmptyStatement
        {
            get { return (EmptyStatement)CodeObject; }
        }

        #endregion

        #region /* RENDERING */

        public override Brush BorderBrush
        {
            get { return Brushes.PaleGoldenrod; }
        }

        public override Brush BackgroundBrush
        {
            get { return Brushes.LightYellow; }
        }

        protected override void RenderStatement(CodeRenderer renderer, RenderFlags flags)
        { }

        public override void RenderToolTip(CodeRenderer renderer, RenderFlags flags = RenderFlags.None)
        {
            TypeRefBaseVM.RenderType(renderer, CodeObject.GetType(), flags, this);
            RenderMessagesInToolTip(renderer);
        }

        #endregion
    }
}
